#ifndef GRAPHIC_MODULE_H
#define GRAPHIC_MODULE_H
#include <SFML/Graphics.hpp>
#include <string>
#include <iostream>
#include <vector>

#include "Anim_Holder.h"
#include "MainGraphic.h"
#include "../vector.h"
#include "GraphicComponent.h"


class Graphic_Module:public GraphicComponent
{
    public:
        Graphic_Module(Anim_Holder & M,std::string curst,MainGraphic &Mg);
        Graphic_Module(Anim_Holder & M,std::string curst,std::string curmor,MainGraphic &Mg);
        virtual ~Graphic_Module();
        void SendData();
        sf::Sprite GetSprite(){
            this->SendData();
            return module.GetSprite();}

        void Set_Morphe(std::string morphe){current_morph=morphe;}
        void Draw(vector const & coord);

        virtual void Set_Statut(std::string statut){current_state=statut;}
        virtual sf::Sprite Update(){return this->GetSprite();}
    protected:
    private:
        MainGraphic *Mgraph;
        Anim_Holder &module;
        std::string current_state;
        std::string current_morph;
        bool morph;


};

#endif // GRAPHIC_MODULE_H
